package com.e3mall.service.impl;

import com.e3mall.mapper.TbItemMapper;
import com.e3mall.pojo.TbItem;
import com.e3mall.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ItemServiceImpl implements ItemService {

    @Autowired
    private TbItemMapper itemMapper;

    @Override
    //根据id查询订单
    public TbItem findItemById(Long id) {
        TbItem tbItem = null;
        if (id != null) {
            tbItem = itemMapper.selectByPrimaryKey(id);
        }
        return tbItem;
    }
}
